package demo;
//Day08
public class Day07002 {
    public static void main(String[] args) {
        Manager manager=new Manager();
        Coder coder=new Coder();
//        给项目经理赋值
        manager.setId(123);
        manager.setSalary(15000.0);
        manager.setBonus(6000.0);
//        给程序员赋值
        coder.setId(135);
        coder.setSalary(10000.0);
//        调用方法
        manager.work();
        coder.work();
    }
}
//项目经理类
class Manager{
    private String name;
    private Integer id;
    private Double salary;
    private Double bonus;

    public Manager() {
    }

    public Manager(String name, Integer id, Double salary, Double bonus) {
        this.name = name;
        this.id = id;
        this.salary = salary;
        this.bonus = bonus;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Double getSalary() {
        return salary;
    }

    public void setSalary(Double salary) {
        this.salary = salary;
    }

    public Double getBonus() {
        return bonus;
    }

    public void setBonus(Double bonus) {
        this.bonus = bonus;
    }
    public void work(){
        System.out.println("调用项目经理中的work方法之后的效果：");
        System.out.println("工号为"+this.id+"基本工资为"+this.salary+"奖金为"+this.bonus+"的项目经理正在努力的做着管理工作,分配任务,检查员工提交上来的代码.....");
    }
}
//程序员类
class Coder{
    private String name;
    private Integer id;
    private Double salary;

    public Coder() {
    }

    public Coder(String name, Integer id, Double salary) {
        this.name = name;
        this.id = id;
        this.salary = salary;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Double getSalary() {
        return salary;
    }

    public void setSalary(Double salary) {
        this.salary = salary;
    }
    public void work(){
        System.out.println("调用程序员中的work方法之后的效果：");
        System.out.println("工号为"+this.id+"基本工资为"+this.salary+"的程序员正在努力的写着代码......");
    }
}
